package tau.dimes.config.db;

public class Server
{
	private String name;
	private String type;
	private String host;
	private String port;
	private String schema;
	private String user;
	private String password;

	public String getName()
	{
		return name;
	}

	public void setName(String name)
	{
		this.name = name;
	}

	public String getType()
	{
		return type;
	}

	public void setType(String type)
	{
		this.type = type;
	}

	public String getHost()
	{
		return host;
	}

	public void setHost(String host)
	{
		this.host = host;
	}

	public String getPort()
	{
		return port;
	}

	public void setPort(String port)
	{
		this.port = port;
	}

	public String getSchema()
	{
		return schema;
	}

	public void setSchema(String schema)
	{
		this.schema = schema;
	}

	public String getUser()
	{
		return user;
	}

	public void setUser(String user)
	{
		this.user = user;
	}

	public String getPassword()
	{
		return password;
	}

	public void setPassword(String password)
	{
		this.password = password;
	}

	public String formatConnectionString(String connectionString)
	{
		connectionString = connectionString.replace("[host]", host);
		connectionString = connectionString.replace("[port]", port);
		connectionString = connectionString.replace("[schema]", schema);
		connectionString = connectionString.replace("[user]", user);
		connectionString = connectionString.replace("[password]", password);
		return connectionString;
	}
}
